package com.intretech.umsin.oss.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @version V1.0
 * @ClassName: LocalOSSProperties
 * @Description: LocalOSSProperties 服务实现
 * @author: 李启联
 * @date: 2022-04-25 15:24
 * @Copyright: Copyright (c) 2022
 */
@Configuration
@ConfigurationProperties(prefix = "local.oss", ignoreUnknownFields = true)
@ConditionalOnProperty(name = "oss-type",havingValue = "LOCAL",matchIfMissing = false)
public class LocalOSSConfig {

    private String urlPrefix;
    /**
     * 网关访问路径
     */
    private String domain;

    private String path;

    public String getUrlPrefix() {
        return urlPrefix;
    }

    public String getDomain() {
        return domain;
    }

    public String getPath() {
        return path;
    }

    public void setUrlPrefix(String urlPrefix) {
        this.urlPrefix = urlPrefix;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

    public void setPath(String path) {
        this.path = path;
    }

    @Override
    public String toString() {
        return "LocalOSSConfig{" +
                "urlPrefix='" + urlPrefix + '\'' +
                ", domain='" + domain + '\'' +
                ", localFilePath='" + path + '\'' +
                '}';
    }
}
